package com.ssrs.framework.point;

/**
 * @author ssrs
 */

import com.ssrs.framework.FrameworkPlugin;
import com.ssrs.framework.extend.ExtendException;
import com.ssrs.framework.extend.IExtendAction;
import com.ssrs.framework.extend.annotation.ExtendPoint;

import java.util.HashMap;
import java.util.Map;

@ExtendPoint(
        plugin = FrameworkPlugin.class,
        description = "项目国际化扩展点")
public abstract class I18nPoint implements IExtendAction {
    public static final String ID = "com.ssrs.framework.point.I18nPoint";

    @Override
    public Object execute(Object[] args) throws ExtendException {
        Map<String, Map<String, String>> localMap = new HashMap<>();
        Map<String, Map<String, String>> execute = execute();
        if (execute != null) {
            return execute;
        }
        return localMap;
    }

    /**
     * 执行方法
     * @return 从国际化资源map
     */
    public abstract Map<String, Map<String, String>> execute();
}
